package model

import "time"

type User struct {
	Id      uint64    `gorm:"column:id;type:bigint unsigned;not null;primaryKey"`
	Name    string    `gorm:"column:name;type:varchar(64);not null"`
	Gold    uint64    `gorm:"column:gold;type:bigint unsigned;not null;default:0"`
	Gem     int       `gorm:"column:gem;type:int;not null;default:0"`
	Level   uint16    `gorm:"column:level;type:smallint unsigned;not null;default:1"`
	Exp     uint32    `gorm:"column:exp;type:int unsigned;not null;default:0"`
	Server  uint16    `gorm:"column:server;type:smallint unsigned;not null;default:0"`
	Created time.Time `gorm:"column:created;type:datetime;not null"`
	Updated time.Time `gorm:"column:updated;type:datetime;not null"`
}

func (u *User) TableName() string {
	return "user"
}
